5.3.3 APPX Application Design Manual

+ Chapter 1-1: Overview of Application Design
+ Chapter 1-2: Getting Started
+ Chapter 1-3: Data Dictionary
+ Chapter 1-4: Understanding Process Design
+ Chapter 1-5: Interprocess Communication
+ Chapter 1-6: Customizing Your Application
+ Chapter 1-7: The Documentation Facility
+ Chapter 1-8: Application Design Tools
+ Chapter 2-1: Data Dictionary Overview
+ Chapter 2-2: Data Dictionary Concepts
+ Chapter 2-3: Domains
+ Chapter 2-4: Files and Fields
+ Chapter 2-5: Work Fields
+ Chapter 3-1: Overview of APPX Processes
+ Chapter 3-2: Getting Started
+ Chapter 3-3: Process Definition
+ Chapter 3-4: Menu Processes
+ Chapter 3-5: Job Processes
+ Chapter 3-6: Input Processes
+ Chapter 3-7: Output Processes
+ Chapter 3-8: Update Processes
+ Chapter 3-9: Query Processes
+ Chapter 3-10: Inquiry Processes
+ Chapter 3-11: Status Processes
+ Chapter 3-12: Subroutine Processes
- Chapter 3-13: Table Processes
+ Chapter 3-14: Automatic and Optional Children
+ Chapter 3-15: Using the Image Editor
+ Chapter 3-16: Using GUI Features of the Image Editor
+ Chapter 3-17: Using Event Points
+ Chapter 4-1: ILF Integration
+ Chapter 4-2: True/False Status Indicators
+ Chapter 4-3: Specifying Statements
+ Chapter 4-4: The ILF Editor
+ Chapter 4-5: The Appx ILF Debugger
+ Chapter 4-6: ILF Keyword Reference
+ Chapter 4-7: Predefined Fields
+ Chapter 4-8: Runtime Subroutine's and Predefined Processes
+ Chapter 4-9: Appx Chart Director API

Chapter 3-13: Table Processes

The Table Widget at Runtime


When the Input process executes, after the Pre-Display event point runs, the Table Widget(s) will be loaded. Each Table Widget will execute the Event Points in the Table Source process as described above. You can prevent a Table Widget from loading by setting --- WIDGET RELOAD DATASOURCE to "N" in the Pre-Display event point. You might want to do this if the PCF for the Table Source contains a large number of records, and you don't want the table loaded until the user has a chance to enter some filter criteria.

If you have specified an Option for either the Single click or Double Click actions, then those Options will fire when the user clicks a row. This is no different than the user clicking a button that fires an Option, so the Option Intercept event point will execute first. If --- OPTION still contains the USER XX value after the Option Intercept event point ends, then Appx will continue it's normal processing, i.e., it will attempt to run the specified Optional Child, then re-execute the normal event points for the image, including Pre-Display. This means your Table Widget will be re-executed as well, and the data reloaded (unless you have turned off the --- WIDGET RELOAD DATASOURCE spec). If you do not want this to happen, you should set --- OPTION to blank in the Option Intercept Event Point. Conversely, if you want the Table Widget to reload, but do not want all the other Event Points in the Input process to fire, you can use the --- .WIDGET RELOAD DATASRC subroutine, then set --- OPTION to blank. Since --- OPTION is blank, no other event points will execute, and since --- WIDGET RELOAD DATASRC was run, the Table Widget will re-execute.

Note that if you do not set an Option to fire when the user selects a row or rows, you will need some other method for the user to signal that they are done selecting rows. For example, you could put another button on the image that they click. You can test for that Option, and if true, examine the --- SLCTKEYS memory file to see which keys were selected.

The --- SLCTKEYS memory file contains one record for every row the user selected (including any rows you pre-selected via --- SELECT RECORD). This file is keyed on the Parent Type of the Table Widget (which will always be WIDGET), the row and column position of the Table Widget and a unique sequence number for each row selected. The --- SLCTKEYS PCF KEY VAL field contains the Primary key to the PCF record. You do not have to include the primary key of the PCF file in the Table Widget, Appx will supply that value regardless.

If you have more than one Table Widget on the image, you can use the row and column position to differentiate them. Or, if you gave your Table Widget a name, you can use that to read the --- WIDGET file, then use --- WIDGET KEY in a BEG AT/END AT loop on --- SLCTKEYS to only read records for that Table Widget. For Example:

The --- SLCTKEYS PCF KEY VAL field is an alpha field that may contain binary characters if the PCF Primary key is a numeric field. In this case, you cannot simply move the --- SLCTKEYS PCF KEY VAL field to the numeric field, you need to have a group field that contains the numeric field and move --- SLCTKEYS PCF KEY VAL to that field.

The user can click a column heading to sort the data in ascending or descending order, and they can drag the columns to re-arrange them. These changes will remain until the process is restarted, at which point the widget will revert to the designer's specifications.
Modify via ILF

You can also create or modify the Table Widget via ILF code. The fields unique to the Table Widget are:

    WIDGET WIDGET TYPE - must be TABLE
    WIDGET D SRC AP - The Application ID of the Table Resource
    WIDGET D SRC NAME - The process name of the Table Resource
    WIDGET D SRC INV TYPE - The invocation type of the Table Resource process
    WIDGET OPTION - The option to fire on a single click
    WIDGET OPTION 2 - The option to fire on a double click

Application Design Manual                                         "Powered by Appx Software"

1332

©2006 By APPX Software, Inc. All Rights Reserved